% Test script for feature_image
% run without error

%% load image data
clear t
img = jpeg_read('testprog.jpg');
coef = img.coef_arrays{1};
[M,N] = size(coef);

%% test 1: feature_image - all
disp('test 1 : origin, block, strip')
clear options;
options.origin = 1;
options.block = 1;
options.strip = 1;
t = feature_image(coef, options);
[M1, N1] = size(t.origin);
assert((M1 == M) && (N1 == N));
num_block = M * N / 64;
assert(length(t.block) == num_block);
assert(length(t.strip) == 64);
clear M1 N1;
clear num_block;
disp('    pass')

